﻿using System.Xml;
using System.Xml.Linq;

namespace SPContrib.Extensions
{
    /// <summary>
    /// Extensions for the XmlNode class
    /// </summary>
    public static class XmlNodeExtensions
    {
        /// <summary>
        /// Returns an instance of XElement that represents the XmlNode
        /// </summary>
        public static XElement AsXElement(this XmlNode instance)
        {
            return TypeMapper.Resolve<XmlNode, XElement>(instance);
        }
    }
}
